package taske15;

import java.util.Scanner;

import static java.lang.Integer.sum;

/**
 * @author Administrator
 */
public class Task15_02 {
    public static void main(String[] args) {
       System.out.println("请输入两个数m和n:");
        Scanner scanner=new Scanner(System.in);
        int m=scanner.nextInt();
        int n=scanner.nextInt();
        int result =sum(n,m);
        System.out.println(""+result);

        printstar(n,m);
    }
    private static void printstar( int n, int m){
        for(int i=1;i<=n;i++){
            for (int j=1;j<=m;j++){
                System.out.print("*");
            }
            System.out.println();
        }
    }
    private static int sum(int n,int m){
        int sum=0;
        for(int i=m;i<=n;i++){
            if(i%2==0){
                sum=sum+1;
            }
        }
        return sum;
    }
}
